import { keywordVo, keywordQuery, keywordForm } from '@/api/bomCompareTool/keywordList/type';
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
// 获取关键词列表配置数据
export function getTreeData() {
  return request({
    url: '/biz/keyword-list/query-list/all',
    method: 'get'
  });
}
// 创建关键词列表
export function createTreeData(query) {
  return request({
    url: `/biz/keyword-list/create/${query.get('aircraftModel')}`,
    method: 'post',
    data: query
  });
}
// 获取关键词列表数据
export function getKeyWordsList(query) {
  return request({
    url: `/biz/keyword-list/query/${query.aircraftModel}/${query.listCode}`,
    method: 'get',
    params: query
  });
}
// 删除关键词列表数据
export function deleteKeyWordsList(query) {
  return request({
    url: `/biz/keyword-list/drop/${query.aircraftModel}/${query.listCode}`,
    method: 'post',
    data: ''
  });
}
// 新增关键词列表数据
export function createKeyWordsListData(query) {
  return request({
    url: `/biz/keyword-list/add/${query.aircraftModel}/${query.listCode}`,
    method: 'put',
    data: query.keywordsList
  });
}
// 删除关键词列表数据
export function deleteWordsListData(query) {
  return request({
    url: `/biz/keyword-list/delete/${query.aircraftModel}/${query.listCode}`,
    method: 'delete',
    data: query.keywordsList
  });
}
